home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / int_util.zip / INT.C < prev    next >
Text File  |  1986-12-21  |  1KB  |  34 lines

  1. /*************************************************************
  2.  *                                                           *
  3.  *                 Interrupt Query Utility                   *
  4.  *               Written by Mark C. Peterson                 *
  5.  *                       Norwich, CT                         *
  6.  *                    December 21, 1986                      *
  7.  *              This program and GET_INT reside              *
  8.  *                  in the public domain.                    *
  9.  *                                                           *
  10.  *************************************************************/
  11.  
  12. main (argn, argv)
  13.   int argn;
  14.   char *argv [];
  15.   {
  16.     int n;
  17.     int temp [ 2 ];
  18.  
  19.     if (argn !=2)
  20.       help ();
  21.     sscanf (argv [ 1 ], "%x", &n);
  22.     if (n > 0xFF || n < 0)
  23.       help ();
  24.     get_int (n, temp);
  25.     printf ("%02X = %04X:%04X  ", n, temp [ 0 ], temp [ 1 ]);
  26.   }
  27.  
  28. help ()
  29.  {
  30.     printf ("The proper syntax for INT.EXE is:  INT XX\n");
  31.     printf ("Where \"XX\" is a hexidecimal number.");
  32.     exit ();
  33.  }
  34.